<body class="gray-bg">
<div class="ibox-content">
    <form class="form-horizontal" method="post" action="{:url('WorkflowDiyField/edit')}">
        <input type="hidden" name="main_table" id="main_table" value="{$info.main_table|default=''}">
        <input type="hidden" name="ext_table" id="ext_table" value="{$info.ext_table|default=''}">
        <input type="hidden" name="id" value="{$info['id']|default='0'}">
        <div class="form-group">
            <label class="col-sm-2 control-label">显示名称</label>
            <div class="col-sm-8">
                <input name="show_name" class="form-control" type="text" placeholder="请输名称" value="{$info['show_name']|default=''}"/>
                <span class="help-block m-b-none">字段显示名称，例如：客户来源、客户级别等</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段名称</label>
            <div class="col-sm-8">
                <input name="field_name" class="form-control" type="text" placeholder="请输名称" value="{$info['field_name']|default=''}" readonly/>
                <span class="help-block m-b-none">只能用英文字母或数字，不能用数字开头</span></div>
        </div>
        <div class="form-group text-left">
            <label class="col-sm-2 control-label">数据类型</label>
            <div class="col-sm-8">
                <select data-placeholder="选择数据类型..." name="field_type" class="chosen-select" >
                    {volist name='field_type_list' id='vo'}
                    <option value="{$key}" {notempty name="info['field_type']"} {if condition="$info.field_type eq $key" } selected  {/if} {/notempty}>{$vo['name']}</option>
                    {/volist}
                </select>
                <span class="help-block m-b-none text-danger">注意：修改数据类型可能会影响数据表中已有的数据记录,建议数据表中已经有数据时，不要轻易修改数据类型</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">最大值</label>
            <div class="col-sm-8">
                <input name="max_length" class="form-control" type="text" value="{$info['max_length']|default=''}" required/>
                <span class="help-block m-b-none">数据类型为varchar,int可生效</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段默认值</label>
            <div class="col-sm-8">
                <input type="text" name="field_default" class="form-control" value="{$info['field_default']|default=''}">
                <span class="help-block m-b-none">字段默认值</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段配置项</label>
            <div class="col-sm-8">
                <textarea name="field_option" class="form-control">{$info['field_option']|default=''}</textarea>
                <span class="help-block m-b-none">如果是枚举型 需要配置该项数据类型为select、radio、checkbox时，此处填写被选择的项目(用“|”分开，如“男|女”)。</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段备注</label>
            <div class="col-sm-8">
                <input name="field_desc" class="form-control" type="text" value="{$info['field_desc']|default=''}" />
                <span class="help-block m-b-none">前台字段备注,字段提示</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-8">
                <input name="sort" class="form-control" type="text" placeholder="排序" value="{$info['sort']|default='100'}"/>
                <span class="help-block m-b-none">用于显示位置排序</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">是否启用</label>
            <div class="col-sm-8">
                <div class="checkbox i-checks">
                    <input type="checkbox" name="visible" value="1" {eq name="$info['visible']" value='1'} checked{/eq}/>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                {include file="admin@layout/save_btn"}
            </div>
        </div>
    </form>
</div>